package com.sx.zongzhi.presenter;

import com.sx.zongzhi.MyApplication;
import com.sx.zongzhi.bean.BusinessBean;
import com.sx.zongzhi.modle.CollectManager;
import com.sx.zongzhi.net.BaseCallBack;
import com.sx.zongzhi.net.BaseResult;
import com.sx.zongzhi.view.IBusinessView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by XZY on 2017/11/30.
 *获取户籍人员业务信息
 */
public class PopBusinessPest {

    private IBusinessView businessView;

    public PopBusinessPest(IBusinessView businessView) {
        this.businessView=businessView;
    }


    public void getBusinessList(){
        Map<String,Object> map=new HashMap<>();
        map.put("sid", MyApplication.sid);

        new CollectManager().getBusinessList(map, new BaseCallBack<BaseResult<List<BusinessBean>>>() {
            @Override
            public void onSuccess(BaseResult<List<BusinessBean>> response) {
                businessView.getBusinessView(response.getData());
            }
            @Override
            public void onFailures(String message) {
                businessView.showError(message);
            }
        });
    }

}
